package test.article;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;

public class GeneratorCensorWords {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		URL url = GeneratorCensorWords.class.getClassLoader().getResource(
				"test/article/CensorWords.txt");
		System.out.println(url.getPath());
		BufferedReader br = new BufferedReader(new InputStreamReader(
				new FileInputStream(url.getPath()), "UTF-8"));
		String row;
		//int count = 0;
		StringBuilder censorWords=new StringBuilder();
		while ((row = br.readLine()) != null) {
			System.out.println(row);
			//count++;
			censorWords.append('\"').append(row).append("\",");
		}
		System.out.println(censorWords);
		br.close();

	}

}
